.lig - BAStags - FLightR workflow

Install package

require(devtools)
install_github("SWotherspoon/BAStag")
install_github("eldarrak/FLightR") # note the version
library(BAStag)
library(FLightR)

Here I use FLightR after initial twilight detection by BAStag. First we start with downloading the .lig file .lig file into your working directory. I assume you will name it '749.lig'. 2. open R and process .lig file

d.lux<-readLig("749_000.lig", skip = 0)
d.lux<- subset(d.lux,select=c("Date","Light"))

now we plot the image and select offset

offset = 17
lightImage(d.lux, offset = offset, zlim = c(0, 64), dt = 120) # dt specifies the recording interval

threshold=2.5 # better use 2 for lig files if no strong reason for other value

twl <- preprocessLight(d.lux, threshold, offset = offset,lmax=64) # only needs to be done once

Transfer BAStag output to TAGS format...

library(FLightR)

TAGS.twilights<-BAStag2TAGS(d.lux, twl, threshold=2.5)

Now you can read these data by FLightR.



eldarrak/FLightR documentation built on Nov. 10, 2023, 7:53 a.m.